<%@ taglib prefix="shrio" uri="http://shiro.apache.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="basePath.jsp"%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>权限管理</title>
    <!-- Fav  Icon Link -->
    <link rel="shortcut icon" type="image/png" href="${basePath}afsets/images/fav.png">
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="${basePath}afsets/css/bootstrap.min.css">
    <!-- themify icons CSS -->
    <link rel="stylesheet" href="${basePath}afsets/css/themify-icons.css">
    <!-- Animations CSS -->
    <link rel="stylesheet" href="${basePath}afsets/css/animate.css">
    <!-- Main CSS -->
    <link rel="stylesheet" href="${basePath}afsets/css/styles.css">
    <link rel="stylesheet" href="${basePath}afsets/css/green.css" id="style_theme">
    <link rel="stylesheet" href="${basePath}afsets/css/responsive.css">

    <script src="${basePath}afsets/js/modernizr.min.js"></script>
</head>
<body>
<!-- Pre Loader -->
<div class="loading">
    <div class="spinner">
        <div class="double-bounce1"></div>
        <div class="double-bounce2"></div>
    </div>
</div>
<!--/Pre Loader -->
<div class="wrapper">
    <!-- Page Content -->
    <div id="content">
        <!-- Top Navigation -->
        <div class="container top-brand">
            <nav class="navbar navbar-default">
                <div class="navbar-header">
                    <div class="sidebar-header"> <a href="index.html"><img src="${basePath}afsets/images/logo-dark.png" class="logo" alt="logo"></a>
                    </div>
                </div>
                <ul class="nav justify-content-end">
                    <%@include file="loginOut_head.jsp"%>
                </ul>

            </nav>
        </div>
        <!-- /Top Navigation -->
        <!-- Menu -->
        <div class="container menu-nav">
            <nav class="navbar navbar-expand-lg lochana-bg text-white">
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                        aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="ti-menu text-white"></span>
                </button>

                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav mr-auto">
                        <%@include file="headHTML.jsp"%>
                    </ul>
                </div>
            </nav>
        </div>
        <!-- /Menu -->
        <!-- Breadcrumb -->
        <!-- Page Title -->
        <div class="container mt-0">
            <div class="row breadcrumb-bar">
                <div class="col-md-6">
                    <h3 class="block-title">欢迎：${username}</h3>
                    <a>
                        (
                        <shiro:hasRole name="SUPERADMINISTATOR">
                            <a>超级管理员</a>
                        </shiro:hasRole>
                        <shiro:hasRole name="ADMINISTATOR">
                            <a>管理员</a>
                        </shiro:hasRole>
                        <shiro:hasRole name="USER">
                            <a>普通用户</a>
                        </shiro:hasRole>
                        )
                    </a>

                </div>
                <div class="col-md-6">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="index.html">
                                <span class="ti-home"></span>
                            </a>
                        </li>
                        <li class="breadcrumb-item"><a href="${basePath}/power/logout">退出</a></li>
                    </ol>
                </div>
            </div>
        </div>
        <!-- /Breadcrumb -->
        <!-- Main Content -->
        <div class="container">
            <div class="row">
                <shiro:hasRole name="SUPERADMINISTATOR">
                    <div class="col-md-12">
                        <div class="widget-area-2 lochana-box-shadow">

                            <div class="table-div">
                                <table class="table table-hover">
                                    <h2>恭喜，同步完成！更新了【${count}】条权限信息！所有权限信息如下：</h2>
                                    <tr>
                                        <th>名称</th>
                                        <th>资源路径</th>
                                    </tr>
                                    <c:forEach items="${resources}" var="resource">
                                        <tr>
                                            <td>${resource.userName}</td>
                                            <td>${resource.resUrl}</td>
                                        </tr>
                                    </c:forEach>
                                </table>
                            </div>

                        </div>
                    </div>
                </shiro:hasRole>

            </div>
        </div>
        <!-- /Main Content -->
    </div>
    <!-- /Page Content -->
</div>
<!-- Back to Top -->
<a id="back-to-top" href="#" class="back-to-top">
    <span class="ti-angle-up"></span>
</a>
<!-- /Back to Top -->
<!-- Jquery Library-->
<script src="${basePath}afsets/js/jquery-3.2.1.min.js"></script>
<!-- Popper Library-->
<script src="${basePath}afsets/js/popper.min.js"></script>
<!-- Bootstrap Library-->
<script src="${basePath}afsets/js/bootstrap.min.js"></script>
<!-- Custom Script-->
<script src="${basePath}afsets/js/custom.js"></script>
</body>
</html>
